package com.itlong.cloud.project.operate;

import com.itlong.cloud.POJO.DTO.operate.OperateRobotAccountGetOneDTO;
import com.itlong.cloud.POJO.DTO.operate.OperateRobotAccountGetPageDTO;
import com.itlong.cloud.POJO.DTO.operate.OperateRobotAccountSaveDTO;
import com.itlong.cloud.POJO.DTO.operate.OperateRobotAccountUpdateDTO;
import com.itlong.cloud.POJO.VO.operate.OperateRobotAccountGetOneVO;
import com.itlong.cloud.POJO.VO.operate.OperateRobotAccountGetPageVO;
import com.itlong.cloud.utils.page.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * <desc>
 *      运营-机器人项目账号管理接口暴露
 * <desc/>
 *
 * @createDate 2018/10/11
 */
@FeignClient(name = "project-service")
public interface IOperateRobotAccountServiceClient {

    /**
     * <desc>
     *      添加机器人账号
     * </desc>
     *
     * @param operateRobotAccountSaveDTO 添加机器人账号信息数据DTO
     * @return 受影响行数
     * @author wangzhi
     * @createDate 2018/10/12
     */
    @PostMapping(path = "operate/robotAccount/saveRobotAccount")
    Integer saveRobotAccount(@RequestBody OperateRobotAccountSaveDTO operateRobotAccountSaveDTO) throws Exception;

    /**
     * <desc>
     *      查询单个机器人账号信息
     * </desc>
     *
     * @param operateRobotAccountGetOneDTO 查询单个机器人账号信息数据DTO
     * @return 单个机器人账号信息
     * @author wangzhi
     * @createDate 2018/10/12
     */
    @PostMapping(path = "operate/robotAccount/getOneRobotAccount")
    OperateRobotAccountGetOneVO getOneRobotAccount(@RequestBody OperateRobotAccountGetOneDTO operateRobotAccountGetOneDTO) throws Exception;

    /**
     * <desc>
     *      分页查询机器人账号信息
     * </desc>
     *
     * @param operateRobotAccountGetPageDTO 分页查询机器人账号信息数据DTO
     * @return 查询结果集
     * @author wangzhi
     * @createDate 2018/10/12
     */
    @PostMapping(path = "operate/robotAccount/getRobotAccountByPage")
    Page<OperateRobotAccountGetPageVO> getRobotAccountByPage(@RequestBody OperateRobotAccountGetPageDTO operateRobotAccountGetPageDTO) throws Exception;

    /**
     * <desc>
     *      修改机器人账号信息
     * </desc>
     *
     * @param operateRobotAccountUpdateDTO 修改机器人账号信息数据DTO
     * @return 受影响的行数
     * @author wangzhi
     * @createDate 2018/10/12
     */
    @PostMapping(path = "operate/robotAccount/updateRobotAccount")
    Integer updateRobotAccount(@RequestBody OperateRobotAccountUpdateDTO operateRobotAccountUpdateDTO) throws Exception;

    /**
     * <desc>
     *      删除机器人账号信息(批量)
     * </desc>
     *
     * @param ids 数据id，多个用英文逗号连接
     * @return 受影响的行数
     * @author wangzhi
     * @createDate 2018/10/12
     */
    @PostMapping(path = "operate/robotAccount/deleteRobotAccounts")
    Integer deleteRobotAccounts(@RequestParam("ids") String ids) throws Exception;

    /**
     * <desc>
     *      获取开发者账号列表
     * </desc>
     *
     * @param operateRobotAccountGetPageDTO 分页查询机器人账号信息数据DTO
     * @return 标准的格式化响应结果
     * @author wangzhi
     * @createDate 2019/09/02
     */
    @PostMapping(path = "operate/robotAccount/getDeveloperList")
    List<Map<String,Object>> getDeveloperList(@RequestBody OperateRobotAccountGetPageDTO operateRobotAccountGetPageDTO) throws Exception;
}
